package com.xjrsoft.module.customerTwo.EMP.dormitory_room.service;

import com.xjrsoft.module.customerTwo.EMP.dormitory_room.entity.TDormitoryRoom;
import com.xjrsoft.module.customerTwo.EMP.dormitory_room.dto.TDormitoryRoomListDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xjrsoft.common.page.PageOutput;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 *  服务类
 *
 * @author dongxinhang
 * @since 2023-07-20
 */
public interface ITDormitoryRoomService extends IService<TDormitoryRoom> {
	/**
	 * 自定义分页
	 *
	 * @param pageListDto
	 * @return
	 */
	IPage<TDormitoryRoom> getPageList(TDormitoryRoomListDto pageListDto);

	String addTDormitoryRoom(TDormitoryRoom tDormitoryRoom);

	boolean updateTDormitoryRoom(String id, TDormitoryRoom tDormitoryRoom);

	boolean delete(String ids);

    void getRoomLeft();

	boolean upDateUsedRoomByRoomNum(String roomNum, Integer num) throws Exception;
	/**
	 * 判断房号是否重复
	 * @param roomNumber 房号
	 * @param id 主键id 修改时传入
	 * @return true-重复 false-没重复
	 */
	boolean roomNumberExist(String roomNumber,String id);

	/**
	 * 获取楼层基础数据
	 * @return key:栋编号 value：该栋楼层数据Map
	 * 楼层数据Map key:楼层名称 value：楼层编号
	 */
	Map<String,Map<String,String>> getFloorData();

	/**
	 * 导入时判断房间号是否有重复
	 * @param roomNumberSet 房间号set
	 * @return 已存在的房间号
	 */
	List<String> getRoomNumberList(@Param("roomNumberSet") Set<String> roomNumberSet);

	TDormitoryRoom getByRoomNumber(String roomNumber);
}
